home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SPACE 1
/
SPACE - Library 1 - Volume 1.iso
/
program
/
569
/
dump
/
dump.doc
next >
Wrap
Text File
|
1991-10-19
|
5KB
|
120 lines
HEXADECIMAL DUMP PROGRAM
========================
This program is designed to provide a listing of every hexadecimal word
in a TOS file. It differs from the standard PRINT and SHOW utilities built
into TOS in that it can be used to dump any kind of file - not just text.
The program produces a listing in hexadecimal, which can be directed to the
screen or to the printer.
ASSEMBLY OF DUMP.TOS
The source code for DUMP.TOS comes in the file DUMP.S. I assembled it
using a two-drive system. In drive A, place a disk containing the files:
BATCH.PRG
AS68.PRG
AS68SYMB.DAT
LINK68.PRG
RELMOD.PRG
In drive B, place a disk containing the file DUMP.S.
Create a file called ASMDUMP.BAT with the following commands:
AS68 -U -L B:DUMP.O
LINK68 B:DUMP
RELMOD B:DUMP.68K B:DUMP.TOS
Now click on BATCH.PRG in drive A. If you have not already done so,
install it as an application for .BAT files.
Finally, double click on ASMDUMP.BAT, which you have just created.
The program will create the files DUMP.O, DUMP.68K and DUMP.TOS. Throw away
the files DUMP.O and DUMP.68K.
The program DUMP.TOS can be clicked directly, or can be used with
parameters from a batch file. If you start DUMP.TOS without parameters, you
will type in a command line which selects the files to dump and the destination
(screen or printer) of the display.
THE COMMAND LINE
DUMP.TOS gets its instructions from a COMMAND LINE. If parameters are
used, either from GEM or from a batch file, the parameters become the command
line. If there are no parameters, you will have to type the command line.
Commands consist of filenames or single characters.
For example, you could enter DUMP.TOS from a batch file like this:
DUMP B:SAMPLE.PRG
This will enter DUMP.TOS and cause it to display the contents of the
file B:SAMPLE.PRG on the screen. (You could also do this by clicking on
DUMP.TOS and typing "B:SAMPLE.PRG")
You can type more than one file name, like this:
DUMP B:SAMPLE.PRG B:EXAMP.PRG B:EXAMP.68K
This will cause all three files to be displayed in sequence, separated by
horizontal lines on the screen.
To dump to the printer, precede your file with "P ", like this:
DUMP P B:SAMPLE.PRG
This will cause DUMP.TOS to list the contents of B:SAMPLE.PRG on the printer.
NOTE:if the printer is not connected or selected, DUMP.TOS will display
"Printer not ready!" and continue to display to the screen.
You can also mix dumping to the printer with dumping to the screen. To
return to the screen, use "S ", like this:
DUMP P B:SAMPLE.PRG S B:SAMPLE.PRG
will dump B:SAMPLE.PRG twice, first to the printer (P), then to the screen (S).
You can order DUMP.TOS to wait between dumps (possibly while you change
disks.) You do this by typing "W " on the command line, like this:
DUMP P DISK1.PRG W DISK2.PRG
This will dump DISK1.PRG to the printer, then put up the message
--Press a key--
on the screen. When you press a key, DISK2.PRG will be sent to the printer.
When all dumps are finished, DUMP.TOS will do an automatic wait if it is
dumping to the screen, but will stop if dumping to the printer.
FORMAT OF THE DUMP
DUMP.TOS displays files to the screen in this format.
File: B:SAMPLE.PRG <==File name
00000000 0D0A 2A2A 4170 7374 6172 7420 636F 7079 ..**Apstart copy
A A A A A A A A A A
! ! ! ! ! ! ! ! ! !
Byte Word 1 ! Word 3 ! Word 5 ! Word 7 ! Bytes 0-15
Count Word 2 Word 4 Word 6 Word 8
:
:
00002720 0D0A 2A00 ..*
A A A A
! ! ! !
Byte ! Last Word Last Bytes
Next-to-Last Word
---------------------------------------------
In this example, the file was 2723 bytes long. The lower byte of the last
word is "junk" and can be ignored.
All bytes are displayed as characters on the right side of each line. If a
character is a control character which cannot be displayed, it is converted
to a period.
PAUSING THE DUMP
At any time after you type the command line, you may stop DUMP.TOS
to examine the dump or manipulate the printer. Do this by pressing the SPACE
bar. DUMP.TOS will stop at the end of the line and display
--More--
Pressing the SPACE bar will cause the next line to be displayed. You can
continue to display lines one at a time with the SPACE bar. To return to
continuous display, press RETURN.
Press CTRL-C at any time to cancel the dump entirely. DUMP.TOS will move
on to the next item in the command line.
GUILT AND RESPONSIBILITY
Please place the blame for this program on:
Silas Warner
MicroProse Software
120 Lakefront Drive
Hunt Valley, MD 21117
301-667-1151
And watch for SILENT SERVICE, MicroProse's new ST game that puts the entire
Pacific Ocean in your cot getting it wet!